#ifndef UNITTEST_H_
#define UNITTEST_H_

#include <stdint.h>
#include <illib/Log.h>

#define AT() __FILE__, __LINE__
#define EX(x) (x), #x
#define EXP(x) static_cast<void*>(x), #x
#define TN(x) #x


namespace ut{
	void test(const char *file, uint32_t line, bool result, const char* expr, const char *fmt, ...);
	void summary();
	extern bool showTests;

	class UnitTestLogger : public illib::ConsoleLogger {
	public:
		UnitTestLogger(const char * exp) :
			illib::ConsoleLogger(0, "\n", " ")
		{
			illib::Console::print("Testing %s\n", exp);
		}
	};
}

#endif /* UNITTEST_H_ */
